import Vue from 'vue'
import App from './App.vue'
import axios from 'axios';
import VueRouter from 'vue-router';
import VueAxios from 'vue-axios'

import store from './components/store/index';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import './assets/fonts/iconfont.css'

// 组件测试
import Logo from './components/logo.vue'
import InfosHeader from './components/infos_header.vue'
import CoHeader from './components/co_header.vue'
import HoHeader from './components/ho_header.vue'


// 学生登录与注册模块
import StLogin from './view/st_login.vue';
import StRegister from './view/st_ register.vue';
// 学生课程模块
import StCeckCourse from './view/st_check_course.vue';
import StSelectCourse from './view/st_select_course.vue';
import StSelectCourseClass from './view/st_select_course_class.vue'
// 学生课程主模块
import StHome from './view/st_home.vue'
import StInfo from './view/st_info.vue'


// 作业详情
import Detail from './view/test_detail.vue'
import DetailPoetry from './view/test_detail_poetry.vue'
import DetailFile from './view/test_detail_file.vue'

// 资料
import Material from './view/material.vue'




Vue.use(ElementUI);
Vue.config.productionTip = false

Vue.use(VueRouter);
Vue.use(VueAxios, axios)
Vue.prototype.$axios = axios;
// Vue.prototype.$http = axios;
// axios.defaults.baseURL = '/api'

let router=new VueRouter({

  mode:'history',
 routes:[
 
   //组件测试
   {
    path:'/logo',
    component:Logo
  },
   {
    path:'/infos_header',
    component:InfosHeader
  },
  {
    path:'/co_header',
    component:CoHeader
  },
  {
    path:'/ho_header',
    component:HoHeader
  },
  // 
  {
    path:'/',
    component:StLogin
  },
  {
   path:'/register',
   component:StRegister
 },

// 课程模块
  {
    path:'/st_course',
    component:StCeckCourse,
  },
  {
    path:'/st_select_course',
    name:'select',
    component:StSelectCourse,
  },
  {
    path:'/st_select_class',
    component:StSelectCourseClass,
  },
  // 课程主
  {
    path:'/st_home',
    component:StHome,
  },
  {
    path:'/st_info',
    component:StInfo,
  },
  
  // 
  {
    path:'/detail',
    component:Detail,
  },
  {
    path:'/detail_poetry',
    component:DetailPoetry,
  },
  {
    path:'/detail_file',
    component:DetailFile,
  },
  // 
  {
    path: '/material',
    component:Material
  },



 ]
});

new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app')